<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.input{
				border: 2px solid red;
			}
		</style>
		<script src="../js/jquery-3.4.1.min.js"></script>
		<script>
			$(function(){
				$("input[name*=wd]").keydown(function(){
					$(this).addClass("input");
				}).keyup(function(){
					$(this).removeClass("input");
				});
				$(document).keydown(function(event){
					if(event.keyCode==13){
						return confirm("真的要提交");
						
					}
				});
				$(window).resize(function(){
					console.log("窗口发生变化了...");
				});
			});
		</script>
	</head>
	<body>
		<form action="https://www.baidu.com/s">
			关键词1<input type="text" name="wd"/>
			关键词2<input type="text" name="wd2"/>
			<input type="submit" value="搜索"/>
		</form>
	</body>
</html>
